hysop.constants module

Default values for constant parameters used in hysop package.

Mostly deals with float/int numbers precision and some labels for numerical methods and operators.

This file is generated from constants.py.in and it’s probably a bad idea to modify it.

hysop.constants.AutotunerFlags

Configuration flags for kernel autotuner (automatic runtime parameters tuning for cuda and opencl).

hysop.constants.Backend

Operator backends

hysop.constants.BoundaryCondition

Boundary conditions enum

class hysop.constants.BoundaryConditionConfig(bc, data=None)[source]

Bases: object

hysop.constants.BoxBoundaryCondition

Box boundary conditions enum.

hysop.constants.CacheType

Cache type enum

class hysop.constants.ComputeGranularity[source]

Bases: object

hysop.constants.DeviceType

Device type enum

hysop.constants.DirectionLabels = 'XYZABCDEFGHIJKLMNOPQRSTUVW'

Directions labels up to 5d

hysop.constants.Directions

Directions enum

hysop.constants.FieldProjection

Field projection mode for Poisson solver

hysop.constants.FpConfig

Floating point flags

hysop.constants.HYSOP_BOOL

type for booleans

hysop.constants.HYSOP_COMPLEX

Set default type for complex numbers

hysop.constants.HYSOP_DEFAULT_TASK_ID = 999

Default value for task id (mpi task)

hysop.constants.HYSOP_DIM

integer used for arrays dimensions

hysop.constants.HYSOP_EPS = 2.220446049250313e-16

machine epsilon for HYSOP_REAL

hysop.constants.HYSOP_INDEX

type for array indices

hysop.constants.HYSOP_INTEGER

type for integers

hysop.constants.HYSOP_MPI_INTEGER = <mpi4py.MPI.Datatype object>

integer type used in MPI

hysop.constants.HYSOP_MPI_REAL = <mpi4py.MPI.Datatype object>

float type used in MPI

hysop.constants.HYSOP_ORDER = 'C'

default array layout (fortran or C convention)

hysop.constants.HYSOP_REAL

Set default type for real numbers

hysop.constants.Implementation

Operator implementations

hysop.constants.MemoryOrdering

Memory ordering enum

hysop.constants.MemoryType

Memory type enum

hysop.constants.PenalizationFormulation

Penalization formulations

hysop.constants.Precision

Real number precision configuration (default_precision = HYSOP_REAL).

hysop.constants.ResidualError

Space discretization for stencil generation

hysop.constants.SIZEOF_HYSOP_BOOL = 1

Size in memory of hysop boolean type

hysop.constants.SIZEOF_HYSOP_COMPLEX = 16

Size in memory of hysop complex default type

hysop.constants.SIZEOF_HYSOP_DIM = 4

Size in memory of hysop dim type

hysop.constants.SIZEOF_HYSOP_INDEX = 4

Size in memory of hysop index type

hysop.constants.SIZEOF_HYSOP_INTEGER = 4

Size in memory of hysop integer type

hysop.constants.SIZEOF_HYSOP_REAL = 8

Size in memory of hysop real default type

hysop.constants.SpaceDiscretization

Space discretization for stencil generation

hysop.constants.StretchingFormulation

Stretching formulations

hysop.constants.SymbolicExpressionKind

Expression kinds for custom symbolic operators.

hysop.constants.System

System type enum.

hysop.constants.TimeIntegratorsOptimisationLevel

Optimisation level for time integrators.

WITH_GUESS: no need to recompute the right-hand side, an initial guess must be given in input arguments.

NOALIAS: no need to recompute the right-hand side, an initial guess must be given in input arguments and we ensure that y is different from result arg.

hysop.constants.boundary2str(b)[source]

Helper function to convert a BoundaryCondition to a short string.

hysop.constants.default_order = C_CONTIGUOUS(0)

Default HySoP memory ordering for array allocations.

hysop.constants.format_boundaries(lboundaries, rboundaries)[source]

Helper function format boundary conditions.

hysop.constants.implementation_to_backend(implementation)[source]